UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'F47CTDu6qOUEWZ9sGZcVw62KuAbysKRLFh+x87SJNfM=' 
WHERE 
  key_id = '2c3b0f0eb744f6d072177670588e291060a1dac30cf63fed2c2cf93da6622604' 
  AND (
    token = 'F47CTDu6qOUEWZ9sGZcVw62KuAbysKRLFh+x87SJNfM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016