UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RTK38vp195yVSfFNgWYR1Cc7BMIEz+yu9vCd3CDq/RU='
WHERE
key_id = '55584adaf5e911b9a0d5fa902e9319cc016efa9e4f7b7741761f94f7102cdf3f'
AND (
token = 'RTK38vp195yVSfFNgWYR1Cc7BMIEz+yu9vCd3CDq/RU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)