UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+ajN2IUDFl1ePQtemqOz0J71DhSNZVZsUSF3Rau2u/k=' 
WHERE 
  key_id = 'b6c7a53ec0c3baa8568449d996d8df127eb33ed969a9878a1eb65666c8584e49' 
  AND (
    token = '+ajN2IUDFl1ePQtemqOz0J71DhSNZVZsUSF3Rau2u/k=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038