UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't+VpI44KGYO2KHNbz6h0iq7iQbFWRrIKT46ZFNcNAA8='
WHERE
key_id = '63ae0b6027f7c5c22cbdb3d496864869e3e89642dbb9d44324da86e39c3237f8'
AND (
token = 't+VpI44KGYO2KHNbz6h0iq7iQbFWRrIKT46ZFNcNAA8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)