UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '03FYIqqftadoUPfEPJBqem1kgwfk/Wh0/zntyZgp+TQ='
WHERE
key_id = '6c5db216f21b0a6894e80fc4bad34b0687e8ba6b476591a75ee330e56dcaf3c2'
AND (
token = '03FYIqqftadoUPfEPJBqem1kgwfk/Wh0/zntyZgp+TQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)