UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JZktOPoD3a95cfGWsPgnYXFzQ5Oe38kP8hcRJp8SWm4='
WHERE
key_id = '2889e21d729622e639dab96f9a759ca4116fa3cf9a2b9003bd36587c5103a2a5'
AND (
token = 'JZktOPoD3a95cfGWsPgnYXFzQ5Oe38kP8hcRJp8SWm4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)