UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/dRyn9JYvU6yLCc6TQIFIHL8NFvn9V1GQ/zGuo4YjQo='
WHERE
key_id = '0066bbf5171fb0f8c9c8f3b7646e0be3d3e8f54199851e159ccdd58f8c9edb31'
AND (
token = '/dRyn9JYvU6yLCc6TQIFIHL8NFvn9V1GQ/zGuo4YjQo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)