UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eiEvD7zVmqAJDfcDpWrFrScdWq/ECKfzMD5m9IXLCDU=' 
WHERE 
  key_id = '5dd759f11c098b6a0ec1a37f17634ffd5a39f50716e90a1eeb8e4e827772abcc' 
  AND (
    token = 'eiEvD7zVmqAJDfcDpWrFrScdWq/ECKfzMD5m9IXLCDU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036