UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VhzgkAy4vqwwDDOjhEmqFzYJQvW9IjDxL/l9/ZXIvQg='
WHERE
key_id = 'd4b25bc3e0cf7dae08c29cab26915eb9f896295b4d36466988c624165aff2e93'
AND (
token = 'VhzgkAy4vqwwDDOjhEmqFzYJQvW9IjDxL/l9/ZXIvQg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)