UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wX/C3IjZPfi4SCmWatYTPXoUqq/Hzavznovd6n/VhiE='
WHERE
key_id = '02f1dadd3c9fb81fa5648236147898d939d63756a81cb4273b83e79fffc33126'
AND (
token = 'wX/C3IjZPfi4SCmWatYTPXoUqq/Hzavznovd6n/VhiE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)