UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7aOGn6Hfulgl+YOBJN3aJqJBBRaFH+obGuPfcGrPNUM='
WHERE
key_id = 'e5edf4c16a6301bd87b5eb5d206e97f1976a0eed24d833aadb18b6cfd4eb50e8'
AND (
token = '7aOGn6Hfulgl+YOBJN3aJqJBBRaFH+obGuPfcGrPNUM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)