UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KHktBE+cHNSAT6ScOym4Gg4Z4Xt/lMl1ADDHl6ZeE9c='
WHERE
key_id = 'c03830a2a1a20683c16e401e872b051a9cb30ef8132bca7320ae12d0e785b6ca'
AND (
token = 'KHktBE+cHNSAT6ScOym4Gg4Z4Xt/lMl1ADDHl6ZeE9c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)