UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+XZV/BSHySXpohvDhbw+fZ3UdX/ZrFCJoi9J/6Ddwlw='
WHERE
key_id = '4bdd40a698679d5e6755fc85046d75b2251d968b7d7c33ba0ee3a8670da4914b'
AND (
token = '+XZV/BSHySXpohvDhbw+fZ3UdX/ZrFCJoi9J/6Ddwlw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)