UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EbAusNTTHv5hbAw2ywbSwG2HzDetkA+H+SkzqzOnX4g='
WHERE
key_id = '8cb81022353527e7cb59d4eeb97f45d44bc1ed7b48e2bda86233a2b56bab4b41'
AND (
token = 'EbAusNTTHv5hbAw2ywbSwG2HzDetkA+H+SkzqzOnX4g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)