UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FhTzOgtIufLlAg/H1mCvRHsWo1HJhnS5pl9Qv4zL7Ew='
WHERE
key_id = '2691a262ad14c9c4be1643cf57bfd3c2ddff289064a01b7de5f5a574266dc1a1'
AND (
token = 'FhTzOgtIufLlAg/H1mCvRHsWo1HJhnS5pl9Qv4zL7Ew='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)