UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j0UxBSJLfByKi97VaB8ha8R8EWj2k0Pt1v5fU/tgtXI='
WHERE
key_id = '10aede913a6e12a85c812aef95446dd79cabb802b08a52557352c94e79422c07'
AND (
token = 'j0UxBSJLfByKi97VaB8ha8R8EWj2k0Pt1v5fU/tgtXI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)