UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6/CqQUEd+uzXPUkzRPZAyERIqu7uWDRiqzyODAlvADc='
WHERE
key_id = 'fc1045bf8b71dee3c3381d6658f61cc8321071d11de8b39d789b7b418ec9ecf3'
AND (
token = '6/CqQUEd+uzXPUkzRPZAyERIqu7uWDRiqzyODAlvADc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)