UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'S1RneHlnrlX2Qce6fuBNwwtsoDz63kNZTwueMf/q6DA='
WHERE
key_id = '6126cd9770da82de16f5329506332eb5173cfd2ac816920ce10113be778cb495'
AND (
token = 'S1RneHlnrlX2Qce6fuBNwwtsoDz63kNZTwueMf/q6DA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)