UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fXtlwhPXbaWZ6st4XoFi6gS/2aUlrgj3Z3J0fm9kKPE=' 
WHERE 
  key_id = 'cd379ba92b23364cefdf739ce842bd14a080dd7f43c4910b839a78c3042a696f' 
  AND (
    token = 'fXtlwhPXbaWZ6st4XoFi6gS/2aUlrgj3Z3J0fm9kKPE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029