UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5IZBtXfzaI62Xc/6o2+99C1STCRZb07D02QTH8wiYJM=' 
WHERE 
  key_id = '3c53388bafde9f7e16becffa8fdcd663b9fc3a14f7c3ac8ad1f60b532aabe600' 
  AND (
    token = '5IZBtXfzaI62Xc/6o2+99C1STCRZb07D02QTH8wiYJM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025