UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EIjJlV4WM+wpVWI+QOpXEjvKTJt1vfuwpRHxnpBYTcA=' 
WHERE 
  key_id = 'e01b1b34ead903d6273e2dfec3fcaee961ca2b7aca303fd647633202f17ad4de' 
  AND (
    token = 'EIjJlV4WM+wpVWI+QOpXEjvKTJt1vfuwpRHxnpBYTcA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00052