UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EgX+RLvEne5xOQumbbhwtWs6f6F0iyBp2Bz8dFUUuvw='
WHERE
key_id = 'cf995d9506a3093de3e6b4ea3b1cc124f4aa91a93ebcbd03125e0f9d266b9714'
AND (
token = 'EgX+RLvEne5xOQumbbhwtWs6f6F0iyBp2Bz8dFUUuvw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)