UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zJxoOKR/EZH2TWhJQwasH17ieb35QyLKr1Mpps8ooOg='
WHERE
key_id = '6977857982789a1f3cf3ea0b9614cfbd0b2d0236e1884076b8155c63782b408b'
AND (
token = 'zJxoOKR/EZH2TWhJQwasH17ieb35QyLKr1Mpps8ooOg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)