UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '18AThQ/tClNQh1Mc9FK/xUW7gCiDHIT0aCQS36BNTLM=' 
WHERE 
  key_id = '7cb5d3c9947e0329f0cef8843b5ee210bcd6fd423623f3f290fa1db463c41425' 
  AND (
    token = '18AThQ/tClNQh1Mc9FK/xUW7gCiDHIT0aCQS36BNTLM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00041