UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uVWsLpSt58EqTqGkG3iWd/r3CDwnDkl7RoBfML//OIo='
WHERE
key_id = '1eb40575bbfae54515f432080fb0e5163fe007a20e2a9dad52d39c7b6a6329ce'
AND (
token = 'uVWsLpSt58EqTqGkG3iWd/r3CDwnDkl7RoBfML//OIo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)