UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E2VkfX/LncfUtuEIwfVBlNBsEk40fE7a8eYI50mtGys='
WHERE
key_id = '8e2bc9c6db3046a6b72cadbcd98be603bda2b3e670bcd5d6a7ab9e0770be89e2'
AND (
token = 'E2VkfX/LncfUtuEIwfVBlNBsEk40fE7a8eYI50mtGys='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)