UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AxGSd5pgEHeLL6NABmgAFjCT/bzGGZG7c3zeWAIYcDc='
WHERE
key_id = '7b2f4cca5eccfd8b3ca6dac10d73932911c51b6d492693bc2e5f1490ae86a223'
AND (
token = 'AxGSd5pgEHeLL6NABmgAFjCT/bzGGZG7c3zeWAIYcDc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)