UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hrFHwqVdzUXElW91JIWeSxoFXfH/ekJPuVmpVOtPidA='
WHERE
key_id = '5570429bc8f8ba0e1e5b9ab4dbc114526ee2c7dfbdc25be157bf24f063558f24'
AND (
token = 'hrFHwqVdzUXElW91JIWeSxoFXfH/ekJPuVmpVOtPidA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)