UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yKY2UMvkmG5e3hTJCytQoNyRotZvbY5YEM/Ek3qxFIA='
WHERE
key_id = 'fb3240fca7158d9a9b24aa07795aaca2a49bd7fa8e2e76194b5c8681c0623304'
AND (
token = 'yKY2UMvkmG5e3hTJCytQoNyRotZvbY5YEM/Ek3qxFIA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)