UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wm/2ZLnz8eRCQbdfNT+P0w2tyG1ijd82NcfEb6mPXBU='
WHERE
key_id = '119472ffbfc056b295d5a1ddc528e4224024301c5456f0bb5d7c1aa658d2f2fd'
AND (
token = 'wm/2ZLnz8eRCQbdfNT+P0w2tyG1ijd82NcfEb6mPXBU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)