UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TXKASituPBJEeQe47/rj3ARf2mrRJoB/wjRm05sPInk='
WHERE
key_id = 'd920a9c23fdc85d544bb821a374dfb07d7d5e83a33f34e93b462390f4c1adf74'
AND (
token = 'TXKASituPBJEeQe47/rj3ARf2mrRJoB/wjRm05sPInk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)