UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZzwPtiiiatiPy9nXHRodfnlXosi3zPiVWSnwGqL6huk=' 
WHERE 
  key_id = '499ada9a96015119614a0ac40158899cd9ddab0f6d680d40005dcc459f27d1b6' 
  AND (
    token = 'ZzwPtiiiatiPy9nXHRodfnlXosi3zPiVWSnwGqL6huk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021