UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'go/lR8nlCyiT1ycmTFG7A6+6ye/NRwnyVMFzjclQu9U=' 
WHERE 
  key_id = '6b82a3b7171bc69575e8a2595d39460a5c1bc347f62b5938eedae0d8de6bebaf' 
  AND (
    token = 'go/lR8nlCyiT1ycmTFG7A6+6ye/NRwnyVMFzjclQu9U=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034