UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Zi4UYlo2fRSWqDX8fCoF8OQTILUMjWGu5/FlcqEpCZo='
WHERE
key_id = 'bb67fc02a4c4e3d98afc8a2dc910a7e0ee1a47a3efba4fffa2fdf079afaa2995'
AND (
token = 'Zi4UYlo2fRSWqDX8fCoF8OQTILUMjWGu5/FlcqEpCZo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)