UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zPUvsHqR/uNhqveH/933i53MS6EegZOMXKzwR/34jx0='
WHERE
key_id = 'ea14bec99fdee23eaa34550c5daa38a9b129313733812fe557c6a723726d7290'
AND (
token = 'zPUvsHqR/uNhqveH/933i53MS6EegZOMXKzwR/34jx0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)