UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zrmox+iPNaJ19n6CyjTxT5CxXJsyk47h0uFzWxjx/Ik='
WHERE
key_id = 'b7ccce94829ce980186e495d2bc3b984cddab98617f2baa89f574bdfe34981a5'
AND (
token = 'zrmox+iPNaJ19n6CyjTxT5CxXJsyk47h0uFzWxjx/Ik='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)